#######
# Analysis Code
####### 

First of all you must run main.R which will load and pre-process the data.

####### 
Then you can run independently:

-Summary_and_balance.R: generates Table 1 (Summary Table), the numbers for Supplement Table 1a (Balance Table)

-attrition_table.R: generates Supplement Table 1b (Attrition Table)

-main_regressions.R: can be used to run the regressions for Tables 2 and 3 (default) as well as residuals histograms, and also Supplement Tables 3, 4, 5, 6, 7, 8a, 8b, 11

-additional_tests.R: runs the main regressions with q-values (Tables 2 and 3) and some F-stats for Table 3

-AMA_table.R: runs the regressions for Supplement Table 9

-black_treatments_regressions.R: runs the regressions for Supplement Table 12

-consort_chart_numbers.R: generates the numbers for the consort chart (Figure 1)

-histograms.R: generates the histograms (Figure 2 and 3)

-interaction_tables.R: runs the regressions for Supplement Table 2 (from 2a to 2g)

-regressions_follow_up_sample.R: runs the regressions for Supplement Table 10

-power_calculations.R: produces power calculations

#######
The following scripts can not be run separately but are sourced in some of the previous files:

#Data import and general pre-processing:

-00_import-data.R
-01_clean-lanch-1.R
-02_scramble-treatment.R
-03_standardize_responses.R

#Creation of control variables for Double Post Lasso

-dummy_variables.R

#Useful functions (e.g regression functions)

-helpers.R

#Entropy weighting (generates Hainmueller weights for the regressions with follow-up outcomes)

-entropy_weighting.R